#coding:utf-8

import numpy as np 
import matplotlib.pyplot as plt 
from mpl_toolkits.mplot3d.axes3d import Axes3D

str = input()

x = [] 
y = [] 
z = [] 
f = open(str)
line = f.readline() 
while line:
    # 读取 图像坐标;
    a,b = line.split(',');
    line = f.readline()
    # 读取3D坐标值
    c, d, e = line.split(',');
    x.append(c)
    y.append(d)
    z.append(e)
    line = f.readline()
f.close()

#string型转int型 
x = [float(x) for x in x if x]
y = [float(y) for y in y if y]
z = [float(z) for z in z if z]

print(x)

fig = plt.figure()
ax = Axes3D(fig)
#ax.scatter3D(x, y, z)

for i in range(len(x)):
    ax.scatter(x[i], y[i], z[i], c='r', marker='+')
    # ax.text(x[i], y[i], z[i], i)

ax.set_xlabel('x') 
ax.set_ylabel('y') 
ax.set_zlabel('z')

plt.savefig('3DPoints.png')
plt.show()
